* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f5f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
}

/* 自定义标题栏 */
#title-bar {
    height: 32px;
    background: #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid #ddd;
    user-select: none;
    -webkit-user-select: none; /* 禁用文本选择 */
    app-region: drag; /* 可拖动 */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

#window-controls {
    display: flex;
    gap: 12px;
    app-region: no-drag; /* 不可拖动 */
}

.window-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-btn:hover {
    background: rgba(0,0,0,0.1);
}

.window-btn.close:hover {
    background: #e81123;
    color: white;
}

/* 主内容区 */
.container {
    flex: 1;
    max-width: 800px;
    margin: 20px auto;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 90%;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#filePath {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

#filePath:focus {
    outline: none;
    border-color: #0078d4;
}

button {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#selectFile {
    background: #f0f0f0;
    color: #333;
}

#selectFile:hover {
    background: #e0e0e0;
}

#result {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    white-space: pre-wrap;
    min-height: 80px;
    border: 1px solid #eee;
    font-family: monospace;
    word-break: break-all;
}
